﻿(function(E, T, $){
var selection = E.mod('Selection'),
	testName = 'Bold',
	title = '加粗',
	selectionValue = ['默认文字样式','文字加粗体','文字斜体','文字加下划线','文字下标','文字上标'],
	dom = null,
	node = null,
	cmds = [
		[1500,{fun: function(){
			dom = E.get('document');
			dom.body.innerHTML= '<span id="_testBold">'+selectionValue.join(',')+'</span>';
			node = dom.getElementById('_testBold');
			selection.selectNode(node,true);
			selection.selectedText(selectionValue[0]);
		}}],//选中  文字加粗体 内容
		[500,{name: '#demo-Bold', type:'mouseover'}],
		[500,{name: '#demo-Bold span.Bold', type:'click'}],
		[300,{fun: function(){
			selection.selectedText(selectionValue[1]);
		}}],//选中  文字加粗体 内容
		[1000, {name: '#demo-Bold .jqe-button-menu', type: 'click'}],//弹出下拉菜单
		[500, {name: '#jqe-Bold-0 li[menuname=Bold]', type: 'mouseover'}],//鼠标经过粗体
		[500, {name: '#jqe-Bold-0 li[menuname=Bold] a', type: 'click'}],//单击粗体
		[500,{fun: function(){
			selection.selectedText(selectionValue[2]);
		}}],//选中 文字斜体 内容
		[1000, {name: '#demo-Bold .jqe-button-menu', type: 'click'}],//弹出下拉菜单
		[500,{name: '#jqe-Bold-0 li[menuname=Italic]', type: 'mouseover'}],//鼠标经过斜体
		[500, {name: '#jqe-Bold-0 li[menuname=Italic] a', type: 'click'}],//单击斜体
		[500,{fun: function(){
			selection.selectedText(selectionValue[3]);
		}}],//选中 文字加下划线 内容
		[1000, {name: '#demo-Bold .jqe-button-menu', type: 'click'}],//弹出下拉菜单
		[500, {name: '#jqe-Bold-0 li[menuname=Underline]', type: 'mouseover'}],//鼠标经过 下划线选项
		[500, {name: '#jqe-Bold-0 li[menuname=Underline] a', type: 'click'}],// 单击下划线选项
		[500,{fun: function(){
			selection.selectedText(selectionValue[4]);
		}}],//选中 文字加下划线 内容
		[1000, {name: '#demo-Bold .jqe-button-menu', type: 'click'}],//弹出下拉菜单
		[500, {name: '#jqe-Bold-0 li[menuname=SubScript]', type: 'mouseover'}],//鼠标经过 下标选项
		[500, {name: '#jqe-Bold-0 li[menuname=SubScript] a', type: 'click'}],// 单击 下标选项
		[500,{fun: function(){
			selection.selectedText(selectionValue[5]);
		}}],//选中 文字加下划线 内容
		[1000, {name: '#demo-Bold .jqe-button-menu', type: 'click'}],//弹出下拉菜单
		[500, {name: '#jqe-Bold-0 li[menuname=SuperScript]', type: 'mouseover'}],//鼠标经过 上标选项
		[500, {name: '#jqe-Bold-0 li[menuname=SuperScript] a', type: 'click'}] // 单击 上标选项
	];

T.addTest(testName, cmds, title);
})(jQEditor, AutoTest, jQuery)